import { createApp } from 'vue'
import App from './App.vue'
import naive from 'naive-ui'
import { createRouter, createWebHashHistory } from 'vue-router'
import SingleFileUpload from './components/SingleFileUpload.vue'
import FileSliceUpload from "./components/FileSliceUpload.vue"

const routes = [
    { 
        path: '/singleFileUpload', 
        component: SingleFileUpload, 
        props: { 
            uploadPath: "http://localhost:8088/single-file-upload" 
        },
    },
    { 
        path: '/fileSliceUpload', 
        component: FileSliceUpload, 
        props: { 
            uploadPath: "http://localhost:8088/slice-file-upload" 
        },
    },
]
const router = createRouter({
    history: createWebHashHistory(),
    routes,
})

const app = createApp(App)
app.use(naive)
app.use(router)
app.mount('#app')
